Skip to content

Conversation

@Musi57
Copy link
Contributor

@Musi57 Musi57 commented Jan 18, 2026

No description provided.

Interceptor.attach(address, function (args) {
try {
const basePtr = this.context[register];

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of wrapping the entire function in a try-catch block to guard against null pointers, you can instead use if-statements to check for them and do an early return. NativePointer objects like basePtr have an isNull() method you can use.


// only output japanese characters and no duplicates
if (cleaned.length > 0 &&
/[\u3040-\u30FF\u4E00-\u9FAF]/.test(cleaned) &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex test can be put into its own function like you’ve done for endsWithPunctuation()

@Musi57 Musi57 requested a review from Mansive January 19, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants